package chelydra.sharelydra.server.web.service;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import chelydra.sharelydra.server.web.SLSServlet;
import chelydra.sharelydra.server.ejb.SLSUser;

/**
 *
 * @author scallion
 */
public class SLSDisconnectServlet extends SLSServlet {

	public SLSDisconnectServlet() {
		this.action_name = "disconnect";
	}

	@Override
  protected void processRequest(HttpServletRequest request, HttpServletResponse response)
  throws ServletException, IOException {
		this.initManager(request);
		SLSUser user=this.initAttributes(request,response);
		if (user!=null) {
			user = this.manager.disconnect(user);
		}

		this.rd.forward(request, response);
  }
}
